home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / mpfeel.lha / MPFeel / lex.yy.c < prev    next >
C/C++ Source or Header  |  1992-10-06  |  45KB  |  1,690 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* scanner skeleton version:
  4.  * $Header: /a_mount/brad/denton_export/denton/You/NewYou/Vax/RCS/lex.yy.c,v 1.2 1991/09/11 12:07:18 pab Exp $
  5.  */
  6.  
  7. #define FLEX_SCANNER
  8.  
  9. #include <stdio.h>
  10.  
  11.  
  12. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  13. #ifdef c_plusplus
  14. #ifndef __cplusplus
  15. #define __cplusplus
  16. #endif
  17. #endif
  18.  
  19.  
  20. #ifdef __cplusplus
  21.  
  22. #include <stdlib.h>
  23. #include <osfcn.h>
  24.  
  25. /* use prototypes in function declarations */
  26. #define YY_USE_PROTOS
  27.  
  28. /* the "const" storage-class-modifier is valid */
  29. #define YY_USE_CONST
  30.  
  31. #else    /* ! __cplusplus */
  32.  
  33. #ifdef __STDC__
  34.  
  35. #ifdef __GNUC__
  36. #include <stddef.h>
  37. void *malloc( size_t );
  38. void free( void* );
  39. #else
  40. #include <stdlib.h>
  41. #endif    /* __GNUC__ */
  42.  
  43. #define YY_USE_PROTOS
  44. #define YY_USE_CONST
  45.  
  46. #endif    /* __STDC__ */
  47. #endif    /* ! __cplusplus */
  48.  
  49.  
  50. #ifdef __TURBOC__
  51. #define YY_USE_CONST
  52. #endif
  53.  
  54.  
  55. #ifndef YY_USE_CONST
  56. #define const
  57. #endif
  58.  
  59.  
  60. #ifdef YY_USE_PROTOS
  61. #define YY_PROTO(proto) proto
  62. #else
  63. #define YY_PROTO(proto) ()
  64. /* we can't get here if it's an ANSI C compiler, or a C++ compiler,
  65.  * so it's got to be a K&R compiler, and therefore there's no standard
  66.  * place from which to include these definitions
  67.  */
  68. char *malloc();
  69. int free();
  70. int read();
  71. #endif
  72.  
  73.  
  74. /* amount of stuff to slurp up with each read */
  75. #ifndef YY_READ_BUF_SIZE
  76. #define YY_READ_BUF_SIZE 8192
  77. #endif
  78.  
  79. /* returned upon end-of-file */
  80. #define YY_END_TOK 0
  81.  
  82. /* copy whatever the last rule matched to the standard output */
  83.  
  84. /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
  85. /* this used to be an fputs(), but since the string might contain NUL's,
  86.  * we now use fwrite()
  87.  */
  88. #ifdef titan
  89. #define ECHO (void) fwrite( (char *) yytext, (unsigned) yyleng, 1, yyout )
  90. #else
  91. #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
  92. #endif
  93.  
  94. /* gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  95.  * is returned in "result".
  96.  */
  97. #define YY_INPUT(buf,result,max_size) \
  98.     if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
  99.         YY_FATAL_ERROR( "read() in flex scanner failed" );
  100. #define YY_NULL 0
  101.  
  102. /* no semi-colon after return; correct usage is to write "yyterminate();" -
  103.  * we don't want an extra ';' after the "return" because that will cause
  104.  * some compilers to complain about unreachable statements.
  105.  */
  106. #define yyterminate() return ( YY_NULL )
  107.  
  108. /* report a fatal error */
  109.  
  110. /* The funky do-while is used to turn this macro definition into
  111.  * a single C statement (which needs a semi-colon terminator).
  112.  * This avoids problems with code like:
  113.  *
  114.  *     if ( something_happens )
  115.  *        YY_FATAL_ERROR( "oops, the something happened" );
  116.  *    else
  117.  *        everything_okay();
  118.  *
  119.  * Prior to using the do-while the compiler would get upset at the
  120.  * "else" because it interpreted the "if" statement as being all
  121.  * done when it reached the ';' after the YY_FATAL_ERROR() call.
  122.  */
  123.  
  124. #define YY_FATAL_ERROR(msg) \
  125.     do \
  126.         { \
  127.         (void) fputs( msg, stderr ); \
  128.         (void) putc( '\n', stderr ); \
  129.         exit( 1 ); \
  130.         } \
  131.     while ( 0 )
  132.  
  133. /* default yywrap function - always treat EOF as an EOF */
  134. #define yywrap() 1
  135.  
  136. /* enter a start condition.  This macro really ought to take a parameter,
  137.  * but we do it the disgusting crufty way forced on us by the ()-less
  138.  * definition of BEGIN
  139.  */
  140. #define BEGIN yy_start = 1 + 2 *
  141.  
  142. /* action number for EOF rule of a given start state */
  143. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  144.  
  145. /* special action meaning "start processing a new file" */
  146. #define YY_NEW_FILE \
  147.     do \
  148.         { \
  149.         yy_init_buffer( yy_current_buffer, yyin ); \
  150.         yy_load_buffer_state(); \
  151.         } \
  152.     while ( 0 )
  153.  
  154. /* default declaration of generated scanner - a define so the user can
  155.  * easily add parameters
  156.  */
  157. #define YY_DECL int yylex ( stacktop) void* stacktop;
  158.  
  159. /* code executed at the end of each rule */
  160. #define YY_BREAK break;
  161.  
  162. #define YY_END_OF_BUFFER_CHAR 0
  163.  
  164. #ifndef YY_BUF_SIZE
  165. #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
  166. #endif
  167.  
  168. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  169.  
  170. #define YY_CHAR char
  171. # line 1 "parser.lex"
  172. #define INITIAL 0
  173. /* -*- C -*- */
  174. /* EuLisp lexer
  175.  *
  176.  * Russell Bradford, Bath 1990
  177.  * Based on work by J. Bejar, A. Moreno, E. Sesa (FIB,UPC) - Bath, July 1990
  178.  *
  179.  */
  180. /* $Id: lex.yy.c,v 1.2 1991/09/11 12:07:18 pab Exp $ */
  181. /* $Log:
  182. */
  183. # line 14 "parser.lex"
  184.  
  185. /* Hack the lex reader */
  186.  
  187. #ifdef YY_INPUT
  188. #undef YY_INPUT
  189. #endif
  190.  
  191. #ifndef GNUREADLINE
  192.  
  193. #define YY_INPUT(buf,result,max_size) \
  194.   if ( (result = system_read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
  195.     YY_FATAL_ERROR( "read() in flex scanner failed" );
  196.  
  197. #else /* GNUREADLINE */
  198.  
  199. #define YY_INPUT(buf,result,max_size) \
  200.   { \
  201.     if ( fileno(yyin) == 0) { /* stdin only */ \
  202.       extern char current_prompt_string[]; \
  203.       extern char *readline(char *); \
  204.       char *tmp; \
  205.       \
  206.       retry: \
  207.       \
  208.       tmp = readline(current_prompt_string); \
  209.       \
  210.       if (tmp == NULL) { \
  211.         result = 0; \
  212.       } \
  213.       else if (*tmp != '\0') { \
  214.         add_history(tmp); \
  215.         strcpy(buf,tmp); \
  216.         free(tmp); \
  217.         result = strlen(buf)+1; \
  218.         buf[result-1] = '\n'; \
  219.       } \
  220.       else { \
  221.         goto retry; \
  222.       } \
  223.     \
  224.     } \
  225.     else { \
  226.     \
  227.       if ((result = system_read(fileno(yyin),(char *) buf, max_size )) < 0 ) \
  228.         YY_FATAL_ERROR( "read() in flex scanner failed" ); \
  229.     \
  230.     } \
  231.   }
  232.  
  233. #endif /* GNUREADLINE */
  234.  
  235. /* Emergency fileno */
  236.  
  237. #ifndef fileno
  238. #define fileno(fh) (fh == stdin ? 0 \
  239.             : (fh == stdout ? 1 \
  240.                        : (fh == stderr ? 2 : 3)))
  241. #endif /* fileno */
  242.  
  243. #include <string.h>
  244. #include <ctype.h>
  245. #include "funcalls.h"
  246. #include "defs.h"
  247. #include "structs.h"
  248. #include "global.h"
  249. #include "symboot.h"
  250. #include "lex_global.h"
  251. #include "error.h"
  252. #include "y.tab.h"
  253.  
  254. #ifdef __STDC__
  255. #define OF(ansi, kr, krargs) ansi
  256. #define PROTO(args) args
  257. #else
  258. #define OF(ansi, kr, krargs) kr krargs
  259. #define PROTO(args) ()
  260. #endif
  261.  
  262. #ifdef __STDC__
  263.  
  264. /*
  265. #ifndef DONT_HAVE_STDLIB_H
  266. #include <stdlib.h>
  267. #else
  268. void *malloc( unsigned );
  269. void free( void* );
  270. #endif
  271. */
  272.  
  273. extern int read(int, char *, unsigned);
  274. #else
  275. extern double atof();
  276. #endif
  277.  
  278. /* the values returned */
  279. double flex_floatval;
  280. long flex_ratnumval, flex_ratdenval;
  281. long flex_intval;
  282. char flex_charval;
  283. char flex_stringval[1024];    /* I don't like fixed array sizes */
  284. char flex_idval[256];
  285. pptoken pptok;            /* for backward compatibility */
  286. int lex_input_line_number=1;    /* Needs changing for shared memory */
  287.  
  288. static double convert_float PROTO((void));
  289. static long convert_integer PROTO((char *, int));
  290. static long int_with_base PROTO((char *, int *));
  291. static void convert_rational PROTO((void));
  292. static void convert_string PROTO((void));
  293. static char convert_character PROTO((void));
  294. static void tidy_id PROTO((void));
  295. int escaped_id PROTO((char*));
  296. char *visible PROTO((char));
  297.  
  298. /* forward references */
  299. /* tokens */
  300. /*delimeter    {whitespace}|{pair-begin}|{pair-end}|{string-begin}|{string-end}|{comment-begin}*/
  301. /* character syntax */
  302. /* number syntax */
  303. /* integers */
  304. /* rationals */
  305. /* floats */
  306. /* strings */
  307. /* we do these by hand, as it's easier that way */
  308. /* identifiers */
  309. # line 230 "parser.lex"
  310.  
  311. /* done after the current pattern has been matched and before the
  312.  * corresponding action - sets up yytext
  313.  */
  314. #define YY_DO_BEFORE_ACTION \
  315.     yytext = yy_bp; \
  316.     yyleng = yy_cp - yy_bp; \
  317.     yy_hold_char = *yy_cp; \
  318.     *yy_cp = '\0'; \
  319.     yy_c_buf_p = yy_cp;
  320.  
  321. #define EOB_ACT_CONTINUE_SCAN 0
  322. #define EOB_ACT_END_OF_FILE 1
  323. #define EOB_ACT_LAST_MATCH 2
  324.  
  325. /* return all but the first 'n' matched characters back to the input stream */
  326. #define yyless(n) \
  327.     do \
  328.         { \
  329.         /* undo effects of setting up yytext */ \
  330.         *yy_cp = yy_hold_char; \
  331.         yy_c_buf_p = yy_cp = yy_bp + n; \
  332.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  333.         } \
  334.     while ( 0 )
  335.  
  336. #define unput(c) yyunput( c, yytext )
  337.  
  338.  
  339. struct yy_buffer_state
  340.     {
  341.     FILE *yy_input_file;
  342.  
  343.     YY_CHAR *yy_ch_buf;        /* input buffer */
  344.     YY_CHAR *yy_buf_pos;    /* current position in input buffer */
  345.  
  346.     /* size of input buffer in bytes, not including room for EOB characters*/
  347.     int yy_buf_size;    
  348.  
  349.     /* number of characters read into yy_ch_buf, not including EOB characters */
  350.     int yy_n_chars;
  351.  
  352.     int yy_eof_status;        /* whether we've seen an EOF on this buffer */
  353. #define EOF_NOT_SEEN 0
  354.     /* "pending" happens when the EOF has been seen but there's still
  355.      * some text process
  356.      */
  357. #define EOF_PENDING 1
  358. #define EOF_DONE 2
  359.     };
  360.  
  361. static YY_BUFFER_STATE yy_current_buffer;
  362.  
  363. /* we provide macros for accessing buffer states in case in the
  364.  * future we want to put the buffer states in a more general
  365.  * "scanner state"
  366.  */
  367. #define YY_CURRENT_BUFFER yy_current_buffer
  368.  
  369.  
  370. /* yy_hold_char holds the character lost when yytext is formed */
  371. static YY_CHAR yy_hold_char;
  372.  
  373. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  374.  
  375.  
  376.  
  377. #ifndef YY_USER_ACTION
  378. #define YY_USER_ACTION
  379. #endif
  380.  
  381. #ifndef YY_USER_INIT
  382. #define YY_USER_INIT
  383. #endif
  384.  
  385. extern YY_CHAR *yytext;
  386. extern int yyleng;
  387. extern FILE *yyin, *yyout;
  388.  
  389. YY_CHAR *yytext;
  390. int yyleng;
  391.  
  392. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  393.  
  394. #define YY_END_OF_BUFFER 24
  395. typedef int yy_state_type;
  396. static const short int yy_accept[162] =
  397.     {   0,
  398.         0,    0,   24,   22,    3,    3,   21,   19,   11,    7,
  399.         5,    6,   21,    9,    4,   16,   22,   22,    8,   22,
  400.        21,    0,    0,    0,    0,    0,    0,    0,   21,    0,
  401.        21,   16,    0,    0,   10,   21,   12,    0,    0,   12,
  402.         0,    0,    0,    2,   21,    0,    0,   21,    0,    0,
  403.         0,   14,   15,   17,   20,   20,   20,   20,   20,   20,
  404.        20,   20,   20,   20,   20,   20,   21,    0,    0,   12,
  405.        21,    0,    0,   21,    0,    0,    0,   21,    0,    0,
  406.        12,    0,    0,   13,    0,   12,   18,   20,    0,    0,
  407.         0,    0,    0,    0,    0,    0,    0,    0,   21,    0,
  408.  
  409.         0,   21,   21,    0,    0,    0,   12,    0,   12,    0,
  410.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  411.         0,   20,    0,   21,   12,    0,   13,   13,   13,    0,
  412.         0,    0,    0,    0,    0,    0,    0,    0,   13,    0,
  413.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  414.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  415.         0
  416.     } ;
  417.  
  418. static const YY_CHAR yy_ec[128] =
  419.     {   0,
  420.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  421.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  422.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  423.         1,    4,    5,    6,    7,    5,    5,    5,    8,    9,
  424.        10,    5,   11,   12,   13,   14,   15,   16,   16,   17,
  425.        17,   17,   17,   17,   17,   18,   18,    5,   19,    5,
  426.         5,    5,    5,   20,   21,   22,   21,   23,   23,   21,
  427.        24,   24,   24,   24,   24,   24,   24,   24,   25,   24,
  428.        24,   26,   24,   24,   24,   24,   24,   27,   24,   24,
  429.         5,   28,    5,   29,    5,   30,   31,   32,   33,   34,
  430.  
  431.        35,   36,   24,   24,   37,   24,   38,   39,   40,   41,
  432.        42,   43,   24,   44,   45,   46,   47,   48,   49,   27,
  433.        24,   24,    5,   50,    5,    5,    1
  434.     } ;
  435.  
  436. static const YY_CHAR yy_meta[51] =
  437.     {   0,
  438.         1,    1,    1,    1,    2,    1,    3,    1,    1,    1,
  439.         2,    1,    2,    2,    2,    4,    4,    4,    1,    2,
  440.         4,    4,    4,    5,    5,    5,    5,    2,    2,    1,
  441.         4,    4,    4,    4,    4,    4,    5,    5,    5,    5,
  442.         5,    5,    5,    5,    5,    5,    5,    5,    5,    2
  443.     } ;
  444.  
  445. static const short int yy_base[186] =
  446.     {   0,
  447.         0,    0,  421,  422,  422,  422,   23,  422,   58,  422,
  448.       422,  422,   49,  400,   41,   87,  416,    0,  422,   32,
  449.        34,    0,   42,   71,  402,   36,    0,   94,   43,  389,
  450.        91,    0,    0,   44,  422,   67,  127,    0,   68,  130,
  451.       142,  155,  413,  422,   70,   84,    0,   86,  101,    0,
  452.         0,   39,  139,  400,  422,    0,  375,  382,  377,  369,
  453.       373,  374,  373,  364,  375,  329,  124,    0,  129,  164,
  454.       135,  139,    0,  141,    0,  147,  177,  150,  155,    0,
  455.       185,  193,  205,  199,  208,  217,  335,  422,  281,  275,
  456.       266,  260,  261,  252,  254,  268,  266,  253,  168,  179,
  457.  
  458.         0,  225,  200,  211,    0,  228,  238,  241,  246,  250,
  459.       280,   62,    0,  251,  255,  257,  251,  255,  250,  241,
  460.       254,  422,  240,  253,  256,    0,  269,  115,    0,  237,
  461.       237,  234,  243,  242,  240,  221,  225,  215,    0,  208,
  462.       214,  213,  205,  190,  172,  179,  155,  149,  142,  141,
  463.       139,  104,   93,   90,   77,   78,   98,   60,   50,   36,
  464.       422,  305,  309,  313,  318,  323,  328,  333,  338,   60,
  465.       343,  347,  352,  357,  361,  366,  371,  373,  378,  383,
  466.       388,  393,  398,   57,  400
  467.     } ;
  468.  
  469. static const short int yy_def[186] =
  470.     {   0,
  471.       161,    1,  161,  161,  161,  161,  162,  161,  161,  161,
  472.       161,  161,  163,  161,  164,  161,  165,  166,  161,  167,
  473.       162,  168,  169,  161,  161,  161,  170,  171,  172,    9,
  474.       172,   16,  173,  174,  161,  175,  161,  176,  177,  161,
  475.       161,  161,  165,  161,  162,  167,  167,  162,  169,  169,
  476.       178,  161,  161,  170,  161,  179,  161,  161,  161,  161,
  477.       161,  161,  161,  161,  161,  161,  172,  180,  181,  172,
  478.       172,  174,  174,  175,  182,  183,  161,  175,  177,  177,
  479.       161,  161,  161,  161,  161,  161,  178,  161,  161,  161,
  480.       161,  161,  161,  161,  161,  161,  161,  161,  172,  181,
  481.  
  482.       181,  172,  175,  183,  183,  161,  161,  161,  161,  161,
  483.       161,  161,  184,  161,  161,  161,  161,  161,  161,  161,
  484.       161,  161,  161,  172,  172,  185,  161,  161,  184,  161,
  485.       161,  161,  161,  161,  161,  161,  161,  161,  185,  161,
  486.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  487.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  488.         0,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  489.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  490.       161,  161,  161,  161,  161
  491.     } ;
  492.  
  493. static const short int yy_nxt[473] =
  494.     {   0,
  495.         4,    5,    6,    5,    7,    8,    9,   10,   11,   12,
  496.        13,   14,   13,   15,    7,   16,   16,   16,   17,    7,
  497.         7,    7,    7,    7,    7,    7,    7,   18,    7,   19,
  498.         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
  499.         7,    7,    7,    7,    7,    7,    7,    7,    7,   20,
  500.        22,   53,   53,   41,   52,   30,   37,   37,   37,   47,
  501.       129,   22,   31,   54,   32,   32,   32,  122,   38,   50,
  502.        68,   73,   23,   24,   24,   24,   33,  128,  128,   25,
  503.       160,   45,   26,   23,   27,   28,   24,   24,   24,   25,
  504.        39,   48,   69,   71,   75,   80,   51,   22,   34,   26,
  505.  
  506.        40,   41,   32,   32,   32,  159,   70,   70,   70,   42,
  507.       158,   47,  122,   22,   51,  157,   76,   78,   68,   23,
  508.        42,   42,   56,  122,   57,   58,  122,   59,   50,   60,
  509.       128,  128,   61,   45,   62,   23,  156,   63,   64,   65,
  510.        69,   66,   37,   37,   37,   81,   81,   81,   83,   77,
  511.        48,   68,   82,   41,   53,   53,  101,   84,   84,   84,
  512.        77,   77,   68,   82,   82,   85,   73,   85,   75,  155,
  513.        86,   86,   86,   69,  105,  122,  154,   75,   99,   70,
  514.        70,   70,   80,  153,   69,  152,  102,  106,   71,  106,
  515.        76,   68,  107,  107,  107,   68,  103,  102,  102,   76,
  516.  
  517.        81,   81,   81,  108,   78,  108,  101,   82,  109,  109,
  518.       109,  151,  122,   69,   84,   84,   84,   69,   82,   82,
  519.       110,  110,  110,   86,   86,   86,  111,   75,   99,  112,
  520.       150,  113,   86,   86,   86,  124,  111,  124,  105,  149,
  521.       125,  125,  125,  107,  107,  107,  112,  148,  122,   76,
  522.       147,  146,   68,  107,  107,  107,  109,  109,  109,  122,
  523.       103,  109,  109,  109,  145,  110,  110,  110,  125,  125,
  524.       125,  125,  125,  125,   69,  126,  144,  143,  142,  141,
  525.        68,  140,  122,   68,  127,  138,  137,  136,  135,  134,
  526.       133,  132,  131,  126,  130,  127,  123,  122,  121,  120,
  527.  
  528.       119,  118,   69,  117,  116,   69,   21,  115,   21,   21,
  529.        29,   29,   29,   29,   36,  114,   36,   36,   43,   43,
  530.        43,   43,   43,   45,   45,   45,   45,   45,   46,   46,
  531.        46,   46,   46,   48,   48,   48,   48,   48,   49,   49,
  532.        49,   49,   49,   55,   55,   55,   55,   55,   67,   41,
  533.        67,   67,   71,   71,   71,   71,   71,   72,   72,   72,
  534.        72,   72,   74,   98,   74,   74,   78,   78,   78,   78,
  535.        78,   79,   79,   79,   79,   79,   87,   87,   88,   88,
  536.        88,   88,   88,   99,   99,   99,   99,   99,  100,  100,
  537.       100,  100,  100,  103,  103,  103,  103,  103,  104,  104,
  538.  
  539.       104,  104,  104,  139,  139,   97,   96,   95,   94,   93,
  540.        92,   91,   90,   89,   41,   44,  161,   52,   44,   35,
  541.       161,    3,  161,  161,  161,  161,  161,  161,  161,  161,
  542.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  543.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  544.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  545.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  546.       161,  161
  547.     } ;
  548.  
  549. static const short int yy_chk[473] =
  550.     {   0,
  551.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  552.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  553.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  554.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  555.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  556.         7,   26,   26,   52,   52,   13,   15,   15,   15,   20,
  557.       184,   21,   13,  170,   13,   13,   13,  160,   15,   23,
  558.        29,   34,    7,    9,    9,    9,   13,  112,  112,    9,
  559.       159,   20,    9,   21,    9,    9,   24,   24,   24,    9,
  560.        15,   23,   29,   34,   36,   39,   24,   45,   13,    9,
  561.  
  562.        16,   16,   16,   16,   16,  158,   31,   31,   31,   16,
  563.       157,   46,  156,   48,   24,  155,   36,   39,   31,   45,
  564.        16,   16,   28,  154,   28,   28,  153,   28,   49,   28,
  565.       128,  128,   28,   46,   28,   48,  152,   28,   28,   28,
  566.        31,   28,   37,   37,   37,   40,   40,   40,   41,   37,
  567.        49,   67,   40,   53,   53,   53,   69,   41,   41,   41,
  568.        37,   37,   71,   40,   40,   42,   72,   42,   74,  151,
  569.        42,   42,   42,   67,   76,  150,  149,   78,   69,   70,
  570.        70,   70,   79,  148,   71,  147,   70,   77,   72,   77,
  571.        74,   70,   77,   77,   77,   99,   76,   70,   70,   78,
  572.  
  573.        81,   81,   81,   82,   79,   82,  100,   81,   82,   82,
  574.        82,  146,  145,   70,   84,   84,   84,   99,   81,   81,
  575.        83,   83,   83,   85,   85,   85,   83,  103,  100,   83,
  576.       144,   83,   86,   86,   86,  102,   83,  102,  104,  143,
  577.       102,  102,  102,  106,  106,  106,   83,  142,  141,  103,
  578.       140,  138,  102,  107,  107,  107,  108,  108,  108,  137,
  579.       104,  109,  109,  109,  136,  110,  110,  110,  124,  124,
  580.       124,  125,  125,  125,  102,  110,  135,  134,  133,  132,
  581.       124,  131,  130,  125,  127,  123,  121,  120,  119,  118,
  582.       117,  116,  115,  110,  114,  111,   98,   97,   96,   95,
  583.  
  584.        94,   93,  124,   92,   91,  125,  162,   90,  162,  162,
  585.       163,  163,  163,  163,  164,   89,  164,  164,  165,  165,
  586.       165,  165,  165,  166,  166,  166,  166,  166,  167,  167,
  587.       167,  167,  167,  168,  168,  168,  168,  168,  169,  169,
  588.       169,  169,  169,  171,  171,  171,  171,  171,  172,   87,
  589.       172,  172,  173,  173,  173,  173,  173,  174,  174,  174,
  590.       174,  174,  175,   66,  175,  175,  176,  176,  176,  176,
  591.       176,  177,  177,  177,  177,  177,  178,  178,  179,  179,
  592.       179,  179,  179,  180,  180,  180,  180,  180,  181,  181,
  593.       181,  181,  181,  182,  182,  182,  182,  182,  183,  183,
  594.  
  595.       183,  183,  183,  185,  185,   65,   64,   63,   62,   61,
  596.        60,   59,   58,   57,   54,   43,   30,   25,   17,   14,
  597.         3,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  598.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  599.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  600.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  601.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  602.       161,  161
  603.     } ;
  604.  
  605. static yy_state_type yy_last_accepting_state;
  606. static YY_CHAR *yy_last_accepting_cpos;
  607.  
  608. /* the intent behind this definition is that it'll catch
  609.  * any uses of REJECT which flex missed
  610.  */
  611. #define REJECT reject_used_but_not_detected
  612. #define yymore() yymore_used_but_not_detected
  613. #define YY_MORE_ADJ 0
  614.  
  615. /* these variables are all declared out here so that section 3 code can
  616.  * manipulate them
  617.  */
  618. /* points to current character in buffer */
  619. static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
  620. static int yy_init = 1;        /* whether we need to initialize */
  621. static int yy_start = 0;    /* start state number */
  622.  
  623. /* flag which is used to allow yywrap()'s to do buffer switches
  624.  * instead of setting up a fresh yyin.  A bit of a hack ...
  625.  */
  626. static int yy_did_buffer_switch_on_eof;
  627.  
  628. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  629. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  630. static int yy_get_next_buffer YY_PROTO(( void ));
  631. static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
  632. void yyrestart YY_PROTO(( FILE *input_file ));
  633. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  634. void yy_load_buffer_state YY_PROTO(( void ));
  635. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  636. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  637. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  638.  
  639. #define yy_new_buffer yy_create_buffer
  640.  
  641. #ifdef __cplusplus
  642. static int yyinput YY_PROTO(( void ));
  643. #else
  644. static int input YY_PROTO(( void ));
  645. #endif
  646.  
  647. YY_DECL
  648.     {
  649.     register yy_state_type yy_current_state;
  650.     register YY_CHAR *yy_cp, *yy_bp;
  651.     register int yy_act;
  652.  
  653.  
  654.  
  655.  
  656.     if ( yy_init )
  657.     {
  658.     YY_USER_INIT;
  659.  
  660.     if ( ! yy_start )
  661.         yy_start = 1;    /* first start state */
  662.  
  663.     if ( ! yyin )
  664.         yyin = stdin;
  665.  
  666.     if ( ! yyout )
  667.         yyout = stdout;
  668.  
  669.     if ( yy_current_buffer )
  670.         yy_init_buffer( yy_current_buffer, yyin );
  671.     else
  672.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  673.  
  674.     yy_load_buffer_state();
  675.  
  676.     yy_init = 0;
  677.     }
  678.  
  679.     while ( 1 )        /* loops until end-of-file is reached */
  680.     {
  681.     yy_cp = yy_c_buf_p;
  682.  
  683.     /* support of yytext */
  684.     *yy_cp = yy_hold_char;
  685.  
  686.     /* yy_bp points to the position in yy_ch_buf of the start of the
  687.      * current run.
  688.      */
  689.     yy_bp = yy_cp;
  690.  
  691.     yy_current_state = yy_start;
  692. yy_match:
  693.     do
  694.         {
  695.         register YY_CHAR yy_c = yy_ec[*yy_cp];
  696.         if ( yy_accept[yy_current_state] )
  697.         {
  698.         yy_last_accepting_state = yy_current_state;
  699.         yy_last_accepting_cpos = yy_cp;
  700.         }
  701.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  702.         {
  703.         yy_current_state = yy_def[yy_current_state];
  704.         if ( yy_current_state >= 162 )
  705.             yy_c = yy_meta[yy_c];
  706.         }
  707.         yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  708.         ++yy_cp;
  709.         }
  710.     while ( yy_current_state != 161 );
  711.     yy_cp = yy_last_accepting_cpos;
  712.     yy_current_state = yy_last_accepting_state;
  713.  
  714. yy_find_action:
  715.     yy_act = yy_accept[yy_current_state];
  716.  
  717.     YY_DO_BEFORE_ACTION;
  718.     YY_USER_ACTION;
  719.  
  720. do_action:    /* this label is used only to access EOF actions */
  721.  
  722.  
  723.     switch ( yy_act )
  724.         {
  725.         case 0: /* must backtrack */
  726.         /* undo the effects of YY_DO_BEFORE_ACTION */
  727.         *yy_cp = yy_hold_char;
  728.         yy_cp = yy_last_accepting_cpos;
  729.         yy_current_state = yy_last_accepting_state;
  730.         goto yy_find_action;
  731.  
  732. case YY_STATE_EOF(INITIAL):
  733. # line 232 "parser.lex"
  734. { return(END_OF_STREAM); }
  735.     YY_BREAK
  736. case 2:
  737. # line 234 "parser.lex"
  738. {lex_input_line_number++;}
  739.     YY_BREAK
  740. case 3:
  741. # line 236 "parser.lex"
  742. {if (yytext[0]=='\n') lex_input_line_number++;}
  743.     YY_BREAK
  744. case 4:
  745. # line 238 "parser.lex"
  746. { return(DOT); }
  747.     YY_BREAK
  748. case 5:
  749. # line 240 "parser.lex"
  750. { return(PAIR_BEGIN); }
  751.     YY_BREAK
  752. case 6:
  753. # line 242 "parser.lex"
  754. { return(PAIR_END); }
  755.     YY_BREAK
  756. case 7:
  757. # line 244 "parser.lex"
  758. { return(QUOTATION); }
  759.     YY_BREAK
  760. case 8:
  761. # line 246 "parser.lex"
  762. { return(ANTI_QUOTATION); }
  763.     YY_BREAK
  764. case 9:
  765. # line 248 "parser.lex"
  766. { return(UNQUOTATION); }
  767.     YY_BREAK
  768. case 10:
  769. # line 250 "parser.lex"
  770. { return(UNQUOTE_SPLICE); }
  771.     YY_BREAK
  772. case 11:
  773. # line 252 "parser.lex"
  774. { return(EXTENSION); }
  775.     YY_BREAK
  776. case 12:
  777. # line 254 "parser.lex"
  778. { flex_floatval = convert_float();
  779.           pptok.float_val = flex_floatval;
  780.           return(TFLOAT); }
  781.     YY_BREAK
  782. case 13:
  783. # line 258 "parser.lex"
  784. { convert_rational();
  785.           pptok.int_val = flex_ratnumval;
  786.           pptok.rat_den_val = flex_ratdenval;
  787.           return(TRATIONAL); }
  788.     YY_BREAK
  789. case 14:
  790. # line 263 "parser.lex"
  791. { flex_intval = convert_integer(yytext, 2);
  792.           pptok.int_val = flex_intval;
  793.           return(TINTEGER); }
  794.     YY_BREAK
  795. case 15:
  796. # line 267 "parser.lex"
  797. { flex_intval = convert_integer(yytext, 8);
  798.           pptok.int_val = flex_intval;
  799.           return(TINTEGER); }
  800.     YY_BREAK
  801. case 16:
  802. # line 271 "parser.lex"
  803. { flex_intval = atol(yytext);
  804.           pptok.int_val = flex_intval;
  805.           return(TINTEGER); }
  806.     YY_BREAK
  807. case 17:
  808. # line 275 "parser.lex"
  809. { flex_intval = convert_integer(yytext, 16);
  810.           pptok.int_val = flex_intval;
  811.           return(TINTEGER); }
  812.     YY_BREAK
  813. case 18:
  814. # line 279 "parser.lex"
  815. { int returns;
  816.               flex_intval = int_with_base(yytext, &returns);
  817.               if (returns != yyleng) yyless(returns);
  818.               pptok.int_val = flex_intval;
  819.               return(TINTEGER); }
  820.     YY_BREAK
  821. case 19:
  822. # line 285 "parser.lex"
  823. { convert_string();
  824.           pptok.string_val = allocate_string(stacktop,flex_stringval,
  825.                              strlen(flex_stringval));
  826.           return(TSTRING); }
  827.     YY_BREAK
  828. case 20:
  829. # line 290 "parser.lex"
  830. { flex_charval = convert_character();
  831.           pptok.char_val = flex_charval;
  832.           return(TCHAR); }
  833.     YY_BREAK
  834. case 21:
  835. # line 294 "parser.lex"
  836. { tidy_id();
  837.           pptok.sym_val = flex_idval;
  838.           return(IDENTIFIER); }
  839.     YY_BREAK
  840. case 22:
  841. # line 298 "parser.lex"
  842. { fprintf(stderr, "\n*** Illegal Character '%s' ignored\n",
  843.               visible(*yytext)); }
  844.     YY_BREAK
  845. case 23:
  846. # line 301 "parser.lex"
  847. ECHO;
  848.     YY_BREAK
  849.  
  850.         case YY_END_OF_BUFFER:
  851.         {
  852.         /* amount of text matched not including the EOB char */
  853.         int yy_amount_of_matched_text = yy_cp - yytext - 1;
  854.  
  855.         /* undo the effects of YY_DO_BEFORE_ACTION */
  856.         *yy_cp = yy_hold_char;
  857.  
  858.         /* note that here we test for yy_c_buf_p "<=" to the position
  859.          * of the first EOB in the buffer, since yy_c_buf_p will
  860.          * already have been incremented past the NUL character
  861.          * (since all states make transitions on EOB to the end-
  862.          * of-buffer state).  Contrast this with the test in yyinput().
  863.          */
  864.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  865.             /* this was really a NUL */
  866.             {
  867.             yy_state_type yy_next_state;
  868.  
  869.             yy_c_buf_p = yytext + yy_amount_of_matched_text;
  870.  
  871.             yy_current_state = yy_get_previous_state();
  872.  
  873.             /* okay, we're now positioned to make the
  874.              * NUL transition.  We couldn't have
  875.              * yy_get_previous_state() go ahead and do it
  876.              * for us because it doesn't know how to deal
  877.              * with the possibility of jamming (and we
  878.              * don't want to build jamming into it because
  879.              * then it will run more slowly)
  880.              */
  881.  
  882.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  883.  
  884.             yy_bp = yytext + YY_MORE_ADJ;
  885.  
  886.             if ( yy_next_state )
  887.             {
  888.             /* consume the NUL */
  889.             yy_cp = ++yy_c_buf_p;
  890.             yy_current_state = yy_next_state;
  891.             goto yy_match;
  892.             }
  893.  
  894.             else
  895.             {
  896.                 yy_cp = yy_last_accepting_cpos;
  897.                 yy_current_state = yy_last_accepting_state;
  898.             goto yy_find_action;
  899.             }
  900.             }
  901.  
  902.         else switch ( yy_get_next_buffer() )
  903.             {
  904.             case EOB_ACT_END_OF_FILE:
  905.             {
  906.             yy_did_buffer_switch_on_eof = 0;
  907.  
  908.             if ( yywrap() )
  909.                 {
  910.                 /* note: because we've taken care in
  911.                  * yy_get_next_buffer() to have set up yytext,
  912.                  * we can now set up yy_c_buf_p so that if some
  913.                  * total hoser (like flex itself) wants
  914.                  * to call the scanner after we return the
  915.                  * YY_NULL, it'll still work - another YY_NULL
  916.                  * will get returned.
  917.                  */
  918.                 yy_c_buf_p = yytext + YY_MORE_ADJ;
  919.  
  920.                 yy_act = YY_STATE_EOF((yy_start - 1) / 2);
  921.                 goto do_action;
  922.                 }
  923.  
  924.             else
  925.                 {
  926.                 if ( ! yy_did_buffer_switch_on_eof )
  927.                 YY_NEW_FILE;
  928.                 }
  929.             }
  930.             break;
  931.  
  932.             case EOB_ACT_CONTINUE_SCAN:
  933.             yy_c_buf_p = yytext + yy_amount_of_matched_text;
  934.  
  935.             yy_current_state = yy_get_previous_state();
  936.  
  937.             yy_cp = yy_c_buf_p;
  938.             yy_bp = yytext + YY_MORE_ADJ;
  939.             goto yy_match;
  940.  
  941.             case EOB_ACT_LAST_MATCH:
  942.             yy_c_buf_p =
  943.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  944.  
  945.             yy_current_state = yy_get_previous_state();
  946.  
  947.             yy_cp = yy_c_buf_p;
  948.             yy_bp = yytext + YY_MORE_ADJ;
  949.             goto yy_find_action;
  950.             }
  951.         break;
  952.         }
  953.  
  954.         default:
  955. #ifdef FLEX_DEBUG
  956.         printf( "action # %d\n", yy_act );
  957. #endif
  958.         YY_FATAL_ERROR(
  959.             "fatal flex scanner internal error--no action found" );
  960.         }
  961.     }
  962.     }
  963.  
  964.  
  965. /* yy_get_next_buffer - try to read in a new buffer
  966.  *
  967.  * synopsis
  968.  *     int yy_get_next_buffer();
  969.  *     
  970.  * returns a code representing an action
  971.  *     EOB_ACT_LAST_MATCH - 
  972.  *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  973.  *     EOB_ACT_END_OF_FILE - end of file
  974.  */
  975.  
  976. static int yy_get_next_buffer()
  977.  
  978.     {
  979.     register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
  980.     register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
  981.     register int number_to_move, i;
  982.     int ret_val;
  983.  
  984.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  985.     YY_FATAL_ERROR(
  986.         "fatal flex scanner internal error--end of buffer missed" );
  987.  
  988.     /* try to read more data */
  989.  
  990.     /* first move last chars to start of buffer */
  991.     number_to_move = yy_c_buf_p - yytext;
  992.  
  993.     for ( i = 0; i < number_to_move; ++i )
  994.     *(dest++) = *(source++);
  995.  
  996.     if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
  997.     /* don't do the read, it's not guaranteed to return an EOF,
  998.      * just force an EOF
  999.      */
  1000.     yy_n_chars = 0;
  1001.  
  1002.     else
  1003.     {
  1004.     int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
  1005.  
  1006.     if ( num_to_read > YY_READ_BUF_SIZE )
  1007.         num_to_read = YY_READ_BUF_SIZE;
  1008.  
  1009.     else if ( num_to_read <= 0 )
  1010.         YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
  1011.  
  1012.     /* read in more data */
  1013.     YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1014.           yy_n_chars, num_to_read );
  1015.     }
  1016.  
  1017.     if ( yy_n_chars == 0 )
  1018.     {
  1019.     if ( number_to_move == 1 )
  1020.         {
  1021.         ret_val = EOB_ACT_END_OF_FILE;
  1022.         yy_current_buffer->yy_eof_status = EOF_DONE;
  1023.         }
  1024.  
  1025.     else
  1026.         {
  1027.         ret_val = EOB_ACT_LAST_MATCH;
  1028.         yy_current_buffer->yy_eof_status = EOF_PENDING;
  1029.         }
  1030.     }
  1031.  
  1032.     else
  1033.     ret_val = EOB_ACT_CONTINUE_SCAN;
  1034.  
  1035.     yy_n_chars += number_to_move;
  1036.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1037.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1038.  
  1039.     /* yytext begins at the second character in yy_ch_buf; the first
  1040.      * character is the one which preceded it before reading in the latest
  1041.      * buffer; it needs to be kept around in case it's a newline, so
  1042.      * yy_get_previous_state() will have with '^' rules active
  1043.      */
  1044.  
  1045.     yytext = &yy_current_buffer->yy_ch_buf[1];
  1046.  
  1047.     return ( ret_val );
  1048.     }
  1049.  
  1050.  
  1051. /* yy_get_previous_state - get the state just before the EOB char was reached
  1052.  *
  1053.  * synopsis
  1054.  *     yy_state_type yy_get_previous_state();
  1055.  */
  1056.  
  1057. static yy_state_type yy_get_previous_state()
  1058.  
  1059.     {
  1060.     register yy_state_type yy_current_state;
  1061.     register YY_CHAR *yy_cp;
  1062.  
  1063.     yy_current_state = yy_start;
  1064.  
  1065.     for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1066.     {
  1067.     register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
  1068.     if ( yy_accept[yy_current_state] )
  1069.         {
  1070.         yy_last_accepting_state = yy_current_state;
  1071.         yy_last_accepting_cpos = yy_cp;
  1072.         }
  1073.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1074.         {
  1075.         yy_current_state = yy_def[yy_current_state];
  1076.         if ( yy_current_state >= 162 )
  1077.         yy_c = yy_meta[yy_c];
  1078.         }
  1079.     yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1080.     }
  1081.  
  1082.     return ( yy_current_state );
  1083.     }
  1084.  
  1085.  
  1086. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1087.  *
  1088.  * synopsis
  1089.  *     next_state = yy_try_NUL_trans( current_state );
  1090.  */
  1091.  
  1092. #ifdef YY_USE_PROTOS
  1093. static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
  1094. #else
  1095. static yy_state_type yy_try_NUL_trans( yy_current_state )
  1096. register yy_state_type yy_current_state;
  1097. #endif
  1098.  
  1099.     {
  1100.     register int yy_is_jam;
  1101.     register YY_CHAR *yy_cp = yy_c_buf_p;
  1102.  
  1103.     register YY_CHAR yy_c = 1;
  1104.     if ( yy_accept[yy_current_state] )
  1105.     {
  1106.     yy_last_accepting_state = yy_current_state;
  1107.     yy_last_accepting_cpos = yy_cp;
  1108.     }
  1109.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1110.     {
  1111.     yy_current_state = yy_def[yy_current_state];
  1112.     if ( yy_current_state >= 162 )
  1113.         yy_c = yy_meta[yy_c];
  1114.     }
  1115.     yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1116.     yy_is_jam = (yy_current_state == 161);
  1117.  
  1118.     return ( yy_is_jam ? 0 : yy_current_state );
  1119.     }
  1120.  
  1121.  
  1122. #ifdef YY_USE_PROTOS
  1123. static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
  1124. #else
  1125. static void yyunput( c, yy_bp )
  1126. YY_CHAR c;
  1127. register YY_CHAR *yy_bp;
  1128. #endif
  1129.  
  1130.     {
  1131.     register YY_CHAR *yy_cp = yy_c_buf_p;
  1132.  
  1133.     /* undo effects of setting up yytext */
  1134.     *yy_cp = yy_hold_char;
  1135.  
  1136.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1137.     { /* need to shift things up to make room */
  1138.     register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
  1139.     register YY_CHAR *dest =
  1140.         &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
  1141.     register YY_CHAR *source =
  1142.         &yy_current_buffer->yy_ch_buf[number_to_move];
  1143.  
  1144.     while ( source > yy_current_buffer->yy_ch_buf )
  1145.         *--dest = *--source;
  1146.  
  1147.     yy_cp += dest - source;
  1148.     yy_bp += dest - source;
  1149.     yy_n_chars = yy_current_buffer->yy_buf_size;
  1150.  
  1151.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1152.         YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1153.     }
  1154.  
  1155.     if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
  1156.     yy_cp[-2] = '\n';
  1157.  
  1158.     *--yy_cp = c;
  1159.  
  1160.     /* note: the formal parameter *must* be called "yy_bp" for this
  1161.      *       macro to now work correctly
  1162.      */
  1163.     YY_DO_BEFORE_ACTION; /* set up yytext again */
  1164.     }
  1165.  
  1166.  
  1167. #ifdef __cplusplus
  1168. static int yyinput()
  1169. #else
  1170. static int input()
  1171. #endif
  1172.  
  1173.     {
  1174.     int c;
  1175.     YY_CHAR *yy_cp = yy_c_buf_p;
  1176.  
  1177.     *yy_cp = yy_hold_char;
  1178.  
  1179.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1180.     {
  1181.     /* yy_c_buf_p now points to the character we want to return.
  1182.      * If this occurs *before* the EOB characters, then it's a
  1183.      * valid NUL; if not, then we've hit the end of the buffer.
  1184.      */
  1185.     if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1186.         /* this was really a NUL */
  1187.         *yy_c_buf_p = '\0';
  1188.  
  1189.     else
  1190.         { /* need more input */
  1191.         yytext = yy_c_buf_p;
  1192.         ++yy_c_buf_p;
  1193.  
  1194.         switch ( yy_get_next_buffer() )
  1195.         {
  1196.         case EOB_ACT_END_OF_FILE:
  1197.             {
  1198.             if ( yywrap() )
  1199.             {
  1200.             yy_c_buf_p = yytext + YY_MORE_ADJ;
  1201.             return ( EOF );
  1202.             }
  1203.  
  1204.             YY_NEW_FILE;
  1205.  
  1206. #ifdef __cplusplus
  1207.             return ( yyinput() );
  1208. #else
  1209.             return ( input() );
  1210. #endif
  1211.             }
  1212.             break;
  1213.  
  1214.         case EOB_ACT_CONTINUE_SCAN:
  1215.             yy_c_buf_p = yytext + YY_MORE_ADJ;
  1216.             break;
  1217.  
  1218.         case EOB_ACT_LAST_MATCH:
  1219. #ifdef __cplusplus
  1220.             YY_FATAL_ERROR( "unexpected last match in yyinput()" );
  1221. #else
  1222.             YY_FATAL_ERROR( "unexpected last match in input()" );
  1223. #endif
  1224.         }
  1225.         }
  1226.     }
  1227.  
  1228.     c = *yy_c_buf_p;
  1229.     yy_hold_char = *++yy_c_buf_p;
  1230.  
  1231.     return ( c );
  1232.     }
  1233.  
  1234.  
  1235. #ifdef YY_USE_PROTOS
  1236. void yyrestart( FILE *input_file )
  1237. #else
  1238. void yyrestart( input_file )
  1239. FILE *input_file;
  1240. #endif
  1241.  
  1242.     {
  1243.     yy_init_buffer( yy_current_buffer, input_file );
  1244.     yy_load_buffer_state();
  1245.     }
  1246.  
  1247.  
  1248. #ifdef YY_USE_PROTOS
  1249. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1250. #else
  1251. void yy_switch_to_buffer( new_buffer )
  1252. YY_BUFFER_STATE new_buffer;
  1253. #endif
  1254.  
  1255.     {
  1256.     if ( yy_current_buffer == new_buffer )
  1257.     return;
  1258.  
  1259.     if ( yy_current_buffer )
  1260.     {
  1261.     /* flush out information for old buffer */
  1262.     *yy_c_buf_p = yy_hold_char;
  1263.     yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  1264.     yy_current_buffer->yy_n_chars = yy_n_chars;
  1265.     }
  1266.  
  1267.     yy_current_buffer = new_buffer;
  1268.     yy_load_buffer_state();
  1269.  
  1270.     /* we don't actually know whether we did this switch during
  1271.      * EOF (yywrap()) processing, but the only time this flag
  1272.      * is looked at is after yywrap() is called, so it's safe
  1273.      * to go ahead and always set it.
  1274.      */
  1275.     yy_did_buffer_switch_on_eof = 1;
  1276.     }
  1277.  
  1278.  
  1279. #ifdef YY_USE_PROTOS
  1280. void yy_load_buffer_state( void )
  1281. #else
  1282. void yy_load_buffer_state()
  1283. #endif
  1284.  
  1285.     {
  1286.     yy_n_chars = yy_current_buffer->yy_n_chars;
  1287.     yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  1288.     yyin = yy_current_buffer->yy_input_file;
  1289.     yy_hold_char = *yy_c_buf_p;
  1290.     }
  1291.  
  1292.  
  1293. #ifdef YY_USE_PROTOS
  1294. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  1295. #else
  1296. YY_BUFFER_STATE yy_create_buffer( file, size )
  1297. FILE *file;
  1298. int size;
  1299. #endif
  1300.  
  1301.     {
  1302.     YY_BUFFER_STATE b;
  1303.  
  1304.     b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
  1305.  
  1306.     if ( ! b )
  1307.     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1308.  
  1309.     b->yy_buf_size = size;
  1310.  
  1311.     /* yy_ch_buf has to be 2 characters longer than the size given because
  1312.      * we need to put in 2 end-of-buffer characters.
  1313.      */
  1314.     b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
  1315.  
  1316.     if ( ! b->yy_ch_buf )
  1317.     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1318.  
  1319.     yy_init_buffer( b, file );
  1320.  
  1321.     return ( b );
  1322.     }
  1323.  
  1324.  
  1325. #ifdef YY_USE_PROTOS
  1326. void yy_delete_buffer( YY_BUFFER_STATE b )
  1327. #else
  1328. void yy_delete_buffer( b )
  1329. YY_BUFFER_STATE b;
  1330. #endif
  1331.  
  1332.     {
  1333.     if ( b == yy_current_buffer )
  1334.     yy_current_buffer = (YY_BUFFER_STATE) 0;
  1335.  
  1336.     free( (char *) b->yy_ch_buf );
  1337.     free( (char *) b );
  1338.     }
  1339.  
  1340.  
  1341. #ifdef YY_USE_PROTOS
  1342. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  1343. #else
  1344. void yy_init_buffer( b, file )
  1345. YY_BUFFER_STATE b;
  1346. FILE *file;
  1347. #endif
  1348.  
  1349.     {
  1350.     b->yy_input_file = file;
  1351.  
  1352.     /* we put in the '\n' and start reading from [1] so that an
  1353.      * initial match-at-newline will be true.
  1354.      */
  1355.  
  1356.     b->yy_ch_buf[0] = '\n';
  1357.     b->yy_n_chars = 1;
  1358.  
  1359.     /* we always need two end-of-buffer characters.  The first causes
  1360.      * a transition to the end-of-buffer state.  The second causes
  1361.      * a jam in that state.
  1362.      */
  1363.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1364.     b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
  1365.  
  1366.     b->yy_buf_pos = &b->yy_ch_buf[1];
  1367.  
  1368.     b->yy_eof_status = EOF_NOT_SEEN;
  1369.     }
  1370. # line 301 "parser.lex"
  1371.  
  1372.  
  1373. /* +#o123 or -#o123 or #o123 or binary or hex */
  1374. static long convert_integer OF ((char *text, int base),
  1375. (text, base),
  1376. char *text;
  1377. int base;)
  1378. {
  1379.   switch (*text) {
  1380.   case '+':
  1381.     return strtol(text + 3, 0, base);
  1382.   case '-':
  1383.     return -strtol(text + 3, 0, base);
  1384.   default:
  1385.     return strtol(text + 2, 0, base);
  1386.   }
  1387. }
  1388.  
  1389. /* +#5r123 or -#5r123 or #5r123 */
  1390. static long int_with_base OF ((char *text, int *ret),
  1391. (text, ret),
  1392. char *text;
  1393. int *ret;)
  1394. {
  1395.   char *val;
  1396.   int base;
  1397.   long value;
  1398.  
  1399.   switch (*text) {
  1400.   case '+':
  1401.     base = (int)strtol(text + 2, &val, 10);
  1402.     value = strtol(val + 1, &val, base);
  1403.     break;
  1404.   case '-':
  1405.     base = (int)strtol(text + 2, &val, 10);
  1406.     value = -strtol(val + 1, &val, base);
  1407.     break;
  1408.   default:
  1409.     base = (int)strtol(text + 1, &val, 10);
  1410.     value = strtol(val + 1, &val, base);
  1411.     break;
  1412.   }
  1413.  
  1414.   /* all characters used? */
  1415.   *ret = (val - text)/sizeof(char);
  1416.  
  1417.   return value;
  1418. }
  1419.  
  1420. /* 123 or #o123 or #5r123 */
  1421. static long convert_unumber OF ((char *text),
  1422. (text),
  1423. char *text;)
  1424. {
  1425.   char *val;
  1426.   int base;
  1427.  
  1428.   if (*text == '#')
  1429.     switch (text[1]) {
  1430.     case 'b':
  1431.     case 'B':
  1432.       return convert_integer(text, 2);
  1433.     case 'o':
  1434.     case 'O':
  1435.       return convert_integer(text, 8);
  1436.     case 'x':
  1437.     case 'X':
  1438.       return convert_integer(text, 16);
  1439.     default:
  1440.       base = (int)strtol(text + 1, &val, 10);
  1441.       return strtol(val + 1, 0, base);
  1442.     }
  1443.  
  1444.   return atol(text);
  1445. }
  1446.  
  1447. /* +num/num or -num/num or num/num */
  1448. static void convert_rational OF ((void),
  1449. (),
  1450. /**/)
  1451. {
  1452.   char *text = yytext;
  1453.   int sign;
  1454.  
  1455.   if (*text == '+') {
  1456.     sign = 1;
  1457.     text++;
  1458.   }
  1459.   else if (*text == '-') {
  1460.     sign = -1;
  1461.     text++;
  1462.   }
  1463.   else {
  1464.     sign = 1;
  1465.   }
  1466.  
  1467.   flex_ratnumval = sign*convert_unumber(text);
  1468.   text = strchr(text, '/');
  1469.   flex_ratdenval = convert_unumber(text + 1);
  1470.  
  1471. }
  1472.  
  1473. /* #\a or #\^a or #\alert */
  1474. /* ASCII dependent */
  1475. static char convert_character OF ((void),
  1476. (),
  1477. /**/)
  1478. {
  1479.   register int i;
  1480.   for(i=0;i<yyleng;i++)
  1481.     if (yytext[i]=='\n') lex_input_line_number++;
  1482.   if (yyleng == 4) {        /* #\^a or #\^A */
  1483.     if ('a' <= yytext[3] && yytext[3] <= 'z')
  1484.       return (yytext[3] - 'a' + 'A') & 077;
  1485.     else
  1486.       return yytext[3] & 077;
  1487.   }
  1488.  
  1489.   if (yyleng > 4) {        /* #\alert etc */
  1490.     switch (yytext[2]) {
  1491.     case 'a':            /* alert 07 */
  1492.       return 07;        /* Stardent is non-ansi here */
  1493.     case 'b':            /* backspace 010 */
  1494.       return '\b';
  1495.     case 'd':            /* delete 0177 */
  1496.       return 0177;
  1497.     case 'f':            /* formfeed 014 */
  1498.       return '\f';
  1499.     case 'l':            /* linefeed 012 */
  1500.     case 'n':                   /* newline 012 */
  1501.       return '\n';
  1502.     case 'r':            /* return 015 */
  1503.       return '\r';
  1504.     case 't':            /* tab 011 */
  1505.       return '\t';
  1506.     case 's':            /* space 040 */
  1507.       return ' ';
  1508.     case 'v':            /* vertical-tab 013 */
  1509.       return '\v';
  1510.     }
  1511.   }  
  1512.   return yytext[2];
  1513. }
  1514.  
  1515. /* get all the escapes out of the identifier: produce the internal form */
  1516. static void tidy_id OF ((void),
  1517. (),
  1518. /**/)
  1519. {
  1520.   int escaped = 0;
  1521.   int i, j;
  1522.  
  1523.   for (i = 0; yytext[i]; i++)
  1524.     if (yytext[i] == '|' ||
  1525.     yytext[i] == '\\') {
  1526.       escaped = 1;
  1527.       break;
  1528.     }
  1529.     
  1530.   if (!escaped) {
  1531.     strcpy(flex_idval, yytext);
  1532.     return;
  1533.   }
  1534.  
  1535.   i = 0;
  1536.   j = 0;
  1537.   while (yytext[j]) {
  1538.     if (yytext[j] == '\\') {
  1539.       if (yytext[j+1] == '|') {
  1540.         flex_idval[i++] = '|';
  1541.         j++;
  1542.       }
  1543.       else if (yytext[j+1] == '\\') {
  1544.         flex_idval[i++] = '\\';
  1545.         j++;
  1546.       }
  1547.       else if (yytext[j+1] == '\n') {
  1548.     lex_input_line_number++;
  1549.     flex_idval[i++] = '\n';
  1550.     j++;
  1551.       }
  1552.       j++;
  1553.     } else if (yytext[j] == '|') j++;
  1554.     else {            /* Copy the text, checking for newline */
  1555.       if ((flex_idval[i++] = yytext[j++])=='\n')
  1556.     lex_input_line_number++;
  1557.     }
  1558.   }
  1559.  
  1560.   flex_idval[i] = 0;
  1561. }
  1562.  
  1563. /* do we need to escape this id when printing?
  1564.  * yes if (1) it contains a dodgy character
  1565.  *        (2) it is the id of zero length
  1566.  *        (3) it starts with the syntax of a number
  1567.  *
  1568.  * ASCII dependent
  1569.  */
  1570. int escaped_id OF ((char *id),
  1571. (id),
  1572. char *id;)
  1573. {
  1574.   int i;
  1575.  
  1576.   for (i = 0; id[i]; i++)
  1577.     if (id[i] < 32 || id[i] > 126 || id[i] == '|' || id[i] == '\\') return 1;
  1578.  
  1579.   if (strpbrk(id, "|\\#()\"',;` ") ||
  1580.       id[0] == 0 ||        /* zero length id */
  1581.       isdigit(id[0]) ||                    /* 123 */
  1582.       (id[0] == '.' && !id[1]) ||            /* |.| */
  1583.       (id[0] == '.' && id[1] && isdigit(id[1])) ||    /* .123 */
  1584.       ((id[0] == '+' || id[0] == '-') &&
  1585.     id[1] && (isdigit(id[1]) ||            /* +123 */
  1586.               (id[1] == '.' && id[2] && isdigit(id[2]))))) /* +.123 */
  1587.     return 1;
  1588.   else
  1589.     return 0;
  1590. }
  1591.  
  1592. static void convert_string OF ((void),
  1593. (),
  1594. /**/)
  1595. {
  1596.   int ch, prevch;
  1597.   int i;
  1598.  
  1599.   i = 0;
  1600.   while ((ch = input()) != '"') {
  1601.     if (ch == '\\')
  1602.       switch (ch = input()) {
  1603.       case '"':
  1604.       case '\\':
  1605.     flex_stringval[i++] = ch;
  1606.     break;
  1607.       case 'n':
  1608.       case 'N':
  1609.     flex_stringval[i++] = '\n';
  1610.     break;
  1611.       case 'x':
  1612.       case 'X':
  1613.     prevch = ch;
  1614.     if (isxdigit(ch = input())) {
  1615.       char val = 0;
  1616.       int count;
  1617.       for (count = 0; count < 4 && isxdigit(ch); count++, ch = input()) {
  1618.         val = 16*val;
  1619.         if (isupper(ch)) val += ch - 'A' + 10;
  1620.         else if (islower(ch)) val += ch - 'a' + 10;
  1621.         else val += ch - '0';
  1622.       }
  1623.       flex_stringval[i++] = val;
  1624.     }
  1625.     else flex_stringval[i++] = prevch;
  1626.     unput(ch);
  1627.     break;
  1628.       default:
  1629.     flex_stringval[i++] = ch;
  1630.     break;
  1631.       }
  1632.     else flex_stringval[i++] = ch;
  1633.     if (ch == '\n') lex_input_line_number++;
  1634.   }
  1635.  
  1636.   flex_stringval[i] = 0;
  1637.  
  1638. }
  1639.  
  1640. static double convert_float OF ((void),
  1641. (),
  1642. /**/)
  1643. {
  1644. #ifdef __ANSI__
  1645.   extern double atof(char *);
  1646. #else
  1647.   extern double atof();
  1648. #endif
  1649.  
  1650.   char buf[256];
  1651.   int i;
  1652.  
  1653.   for (i = 0; yytext[i]; i++)
  1654.     buf[i] = (yytext[i] == 'd' || yytext[i] == 'D') ? 'E' : yytext[i];
  1655.   buf[i] = 0;
  1656.  
  1657.   return atof(buf);
  1658. }
  1659.  
  1660. /* more ASCII dependence */
  1661. char *visible OF ((char ch),
  1662. (ch),
  1663. char ch;)
  1664. {
  1665.   static char buf[10];
  1666.   char *ptr = buf;
  1667.  
  1668.   if (ch == 127) return "^?";
  1669.  
  1670.   if (ch > 127) {
  1671.     *ptr++ = 'M';
  1672.     *ptr++ = '-';
  1673.     ch = ch & 0x7f;
  1674.   }
  1675.  
  1676.   if (ch < 32) {
  1677.     *ptr++ = '^';
  1678.     ch += '@';
  1679.   }
  1680.  
  1681.   *ptr++ = ch;
  1682.   *ptr = 0;
  1683.  
  1684.   return buf;
  1685. }
  1686.  
  1687. #ifdef WITH_FUDGE
  1688. #include "yyfudge.c"
  1689. #endif
  1690.